#pragma once

#include <Windows.h>
#include "NeroEngine\NPlatform.h"

//temp
#include "DirectX\Camera.h"

#define WIN32_CHECK(result) Win32Platform::CheckResult(result);

namespace Game
{
	class NGame;
}

namespace System
{
	class Win32Timer;
	class Win32Graphics;
}

namespace System
{
class Win32Platform : public Engine::NPlatform
{
	RTTI_DECLARATIONS(Win32Platform, Engine::NPlatform)
public:
	Win32Platform(HINSTANCE instance, HINSTANCE previousInstance, LPSTR commandLine, int showCommand);

	virtual ~Win32Platform(void);

	virtual void Initialize();

	virtual void Deinitialize();

	virtual void Render();

	virtual void Update();

	float GetDeltaTime();

	float GetGameTime();

	int GetFPS();

	inline Engine::NDevice* GetDevice();

	Engine::NCamera* GetCamera();

	virtual void SetCamera(Engine::NCamera* camera);

	static void CheckResult(HRESULT result);

protected:
	Win32Timer* mTimer;
	Graphics::Camera* mCamera;

private:
	void ProcessInput();
	bool mIsInitialized;
	HINSTANCE mInstance;
	int mShowCommand;
};
}